package com.lin.benchmade.utils;

public class Hit implements Comparable<Hit> {

	private String value;
	private int boost;

	public Hit(String value, int boost) {
		this.value = value;
		this.boost = boost;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public int getBoost() {
		return boost;
	}

	public void setBoost(int boost) {
		this.boost = boost;
	}

	@Override
	public boolean equals(Object obj) {
		Hit h = (Hit) obj;
		return this.value.equals(h.value);
	}

	@Override
	public String toString() {
		return this.value + " " + this.boost;
	}

	@Override
	public int compareTo(Hit o) {
		Hit h1 = o;
		return h1.boost - this.boost;
	}

}
